package com.wsx.carrot.controller;

import com.wsx.carrot.data.BaseWebData;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 该文件后期项目完成后会被删除
 * Created by wangshuaixin on 17/9/7.
 */
@RestController
@RequestMapping("/http")
public class HttpController extends AbstractBaseController implements WebInterface {

    @RequestMapping(
            value = "/get/{id}"
    )
    public BaseWebData getData(@PathVariable String id) {
        if ("test".equals(id)) {
            return new BaseWebData(SUCCESS);
        }
        return new BaseWebData(ERROR);
    }
}
